package Day003_多态_内部类.demo002多态时成员访问特点;

public class Dog extends Animal { // 继承

    int age = 2;

    //方法重写
    public void eat() {
        System.out.println("吃骨头");
    }

    //不属于重写,是子类自己定义的
    //@Override 报错
    public static void sleep(){
        System.out.println("Dog睡觉");
    }
}
